Workload Management
OIPA provides a subsystem for batch processing for insurance transactions called Cycle. Cycle is a high performance distributed subsystem designed to process as many pending transactions as possible in the shortest amount of time. The cycle subsystem drives processing of transactions through a cycle group, which is comprised of a set of cycle agents. For a detailed explanation of how cycle works, refer to the "OIPA Cycle" document available in the current release Documentation Library under Policy Administration Libraries of Oracle Help Center.
Each cycle agent exists in its own JVM process. Cycle agents may be spread across multiple machines. Besides batch processing pending transactions, OIPA also leverages cycle agents to facilitate long running background processes. This allows OIPA to offload processing to cycle agents, freeing up the OIPA application to service user requests. All of the cycle agents together form a processing grid.
OIPA cycle leverages the Coherence executor service to manage processing workloads across the grid. This integration with coherence offers OIPA the following advantages:
- No single point of failure - Coherence ensures high availability by managing data and task ownership across the cluster. If a node fails while processing work, tasks are transparently rescheduled to other available nodes using the Executor Service, helping to prevent data loss or missed execution (outside of catastrophic full-cluster failure).
- No single bottleneck - Task execution is balanced across cluster using Coherence's distributed architecture. The Executor Service allows for fine-grained control over task placement and execution policy, ensuring scalability and throughput across all active members.
- State Management - Coherence continues to manage the state of work items through distributed caches and can be combined with application-defined state tracking. The Executor Service allow greater flexibility in how task state is managed and persisted.
- JMX Support - Coherence provides JMX MBeans and monitoring capabilities for observing task execution via the Executor Service. This includes metrics around queue length, execution time, success/failure counts, and more.
Tasks
Processing is executed on the grid using tasks. A task represents some kind of processing that needs to take place. Conceptually, there are two different kinds of tasks:
- Monitoring tasks – These tasks govern a long running process. They typically wake up on an interval, check some processing, and go back to sleep. Monitoring tasks are not typically processing intensive.
- Processing tasks – These tasks execute some unit of work and are typically short lived. Processing tasks typically are processing intensive. Examples include:
- Cycle task, which will process all pending activities on a policy.
- Scheduled Valuation task, which will value a policy, as well as generate and store valuation records in the database.
All task processing iscarried out using the Coherence Executor Service. Tasks are submitted to the grid by grid clients in various ways, such as:
- The cycle client submits a cycle monitoring task to execute processing at the cycle level.
- An OIPA instance submits a scheduled valuation task to perform scheduled valuations on policies within a plan.
When tasks are submitted for processing, they arrive on a queue at one of the cycle agents connected to the grid. Task scheduling is by default achieved using a Round Robin algorithm. When tasks arrive in the partitioned cache of an agent, they are put into a queue and scheduled for processing in a thread pool. The thread pool size is controlled via the cycle-coherence-cache-config file of the cycle agent.
Processing tasks have short life cycles, where they execute and are then completed. Monitoring tasks have an extended life cycle, and can potentially have an intermediate state. When a monitoring task is executed, it processes and has the ability to yield processing. When it yields, it will be re-dispatched to the cycle grid for processing.